/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.srm.entidades;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 *
 * @author TilZon
 */
@Entity
@DiscriminatorValue("CLIENTE")
@Table(name = "cliente", catalog = "srmdb", schema = "")
@PrimaryKeyJoinColumn(name = "id_cliente", referencedColumnName = "id")
public class Cliente extends Persona implements Serializable {

    @Lob
    @Column(length = 100000)
    private String observacion;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cliente")
    private List<Pago> pagos;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cliente")
    private List<Prestamo> prestamos;


    public Cliente() {
        this.pagos=new ArrayList<Pago>();
        this.prestamos=new ArrayList<Prestamo>();
    }

    public String getObservacion() {
        return observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

    public List<Pago> getPagos() {
        return pagos;
    }

    public void setPagos(List<Pago> pagos) {
        this.pagos = pagos;
    }

    public List<Prestamo> getPrestamos() {
        return prestamos;
    }

    public void setPrestamos(List<Prestamo> prestamos) {
        this.prestamos = prestamos;
    }

    

    
}
